//
//  User.m
//  DeliciousFood1
//
//  Created by brother on 15/10/21.
//  Copyright © 2015年 com.hxm. All rights reserved.
//

#import "User.h"

@implementation User

+(instancetype)userWithDic:(NSDictionary *)dic
{
    return [[self alloc] initWithDic:dic];
}


-(instancetype)initWithDic:(NSDictionary *)dic
{
    if (self = [super init]) {
        self.ID = [dic[@"id"] intValue];
        self.account = dic[@"account"];
        self.password = dic[@"password"];
        self.username = dic[@"username"];
        self.sex = (NSInteger *)[dic[@"sex"] integerValue];
        self.time = dic[@"time"];
        self.head = dic[@"head"];
    }
    return self;
}


@end
